package yzy.ecps.dao.impl;

import java.util.List;

import org.apache.ibatis.session.SqlSession;
import org.mybatis.spring.support.SqlSessionDaoSupport;
import org.springframework.stereotype.Repository;

import yzy.ecps.dao.ParaValueDao;
import yzy.ecps.model.BtcParaValue;

@Repository
public class ParaValueDaoImpl extends SqlSessionDaoSupport implements ParaValueDao {
	
	String ns = "btc_para_value.";
	
	public void saveParaValuesByGoodsId(List<BtcParaValue> paraValues,
			Long goodsId) {
		if(paraValues == null)
			return;
		if(paraValues.size() == 0)
			return;
		
		SqlSession session = getSqlSession();
		for (BtcParaValue pv : paraValues) {
			pv.setGoodsId(goodsId);
			session.insert(ns+"insert",pv);
		}
	}

}
